package java_1_12.dynamic_array;

public class Test {
    public static void main(String[] args) {
        DynamicArray dynamicArray=new DynamicArray(3);
        dynamicArray.addLast(2);
        dynamicArray.addLast(3);
        dynamicArray.addFirst(1);
        dynamicArray.addLast(5);
        dynamicArray.addIndex(3,4);
        System.out.println(dynamicArray.toString());
        System.out.println(dynamicArray.contains(2));
        System.out.println(dynamicArray.get(3));
        System.out.println(dynamicArray.getByVal(4));
        System.out.println(dynamicArray.set(2,10));
        dynamicArray.removeIndex(0);
        dynamicArray.removeIndex(3);
        System.out.println(dynamicArray.toString());
        dynamicArray.removeOnce(10);
        System.out.println(dynamicArray.toString());
        dynamicArray.addIndex(1,10);
        dynamicArray.addLast(10);
        dynamicArray.addLast(10);
        dynamicArray.addLast(10);
        System.out.println(dynamicArray.toString());
        dynamicArray.removeValAll(10);
        System.out.println(dynamicArray.toString());
    }

}
